package cn.qu.phizline.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import cn.qu.phizline.R;

public class MainActivity extends Activity implements IntentExtraKeys, Button.OnClickListener {

    private EditText roomId;
    private Button connectRoom;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_demo);

        this.roomId = (EditText) findViewById(R.id.roomId);
        this.connectRoom = (Button) findViewById(R.id.connectRoom);

        this.connectRoom.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        String id = roomId.getText().toString().trim();
        if ("".equals(id)) return;

        Intent it = new Intent(this, CallActivity.class);

        it.putExtra(ROOM_ID, id);

        this.startActivity(it);
    }
}
